﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using bdxyit.com.RecruitmentAppSys.IDAL;
using bdxyit.com.RecruitmentAppSys.DALFactory;
using bdxyit.com.RecruitmentAppSys.Models;
using bdxyit.com.RecruitmentAppSys.ViewModels;

namespace bdxyit.com.RecruitmentAppSys.BLL
{
    public class UserEducationBLL
    {
        private static readonly IUserEducationDAL ueDal = DataAccess.CreateUserEducation();
        ///// <summary>
        ///// 获取所有的
        ///// </summary>
        ///// <returns></returns>
        public static UserEducation SelectUserEducationByUserIdAndFlag(string userID, int flag)
        {
            return ueDal.SelectUserEducationByUserIdAndFlag(userID, flag);
        }
        ///// <summary>
        ///// 获取
        ///// </summary>
        ///// <returns></returns>
        public static List<UserEducation> SelectUserEducationByUserId(string userId)
        {
            return ueDal.SelectUserEducationByUserId(userId);
        }
        /// <summary>
        /// 删除用户教育信息
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public static bool DeleteUserEducationByUserId(string userID)
        {
            return ueDal.DeleteUserEducationByUserId(userID);
        }
        /// <summary>
        /// 删除用户教育信息
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="flag"></param>
        /// <returns></returns>
        public static bool DeleteUserEducationByUserIdAndFlag(string userID, int flag)
        {
            return ueDal.DeleteUserEducationByUserIdAndFlag(userID, flag);
        }
        /// <summary>
        /// 插入用户教育信息
        /// </summary>
        /// <param name="ue"></param>
        /// <returns></returns>
        public static bool InsertUserEducationByUserId(UserEducation ue)
        {
            return ueDal.InsertUserEducationByUserId(ue);
        }
        /// <summary>
        /// 编辑用户教育信息
        /// </summary>
        /// <param name="ue"></param>
        /// <returns></returns>
        public static bool EditUserEducationByUserId(UserEducation ue)
        {
            return ueDal.EditUserEducationByUserId(ue);
        }
    }
}
